package file;

import java.io.File;
import java.io.IOException;

public class CreateNewFile {
    public static void main(String[] args) throws IOException {

        for (int i=0;i<=10;i++){
            File file=new File("./file"+i+".txt");
            file.createNewFile();

        }System.out.println("创建完毕");








      /* File file=new File("./test.txt");
       if (file.exists()){
           System.out.println("文件存在");
       }else {
           file.createNewFile();
           System.out.println("创建成功");
       }

       */

    }
}
